﻿using System.Text.RegularExpressions;

namespace AfrikDotnetWebSite.Helpers
{
    public class LinkHelper
    {
        public static string MakeLink(string txt)
        {
            return Regex.Replace(txt,
                                @"(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&amp;:/~\+#]*[\w\-\@?^=%&amp;/~\+#])",
                                @"<a href=""$0"" target=""_blank"">$0</a>"
                                );

        }
    }
}